﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Channelvn.Cached.Common;
using BAL;

namespace ProjectQuaDep.Control
{
    public partial class Header : System.Web.UI.UserControl
    {
        public int CurrentRound = 0;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Lib.QueryString.url.ToString() != "mn" && Lib.QueryString.PageType.ToString() != "3")
                    Page.RegisterHiddenField("hdMemnu", Lib.QueryString.url == "xbc" ? "9" : Lib.QueryString.PageType.ToString());
                CurrentRound = Utils.GetCurrentRound();
                if(CurrentRound > 0)
                    ltrUpAnh.Text = "<a style=\"color:#fff;font-weight:bold\" href=\"/up-anh.htm\">Tham gia chia sẻ ảnh</a></p>";
                else
                    ltrUpAnh.Text = "<a style=\"color:#fff;font-weight:bold\" href=\"javascript:void(0);\" onClick=\"alert('Hiện tại chưa có vòng thi nào diễn ra.')\">Tham gia chia sẻ ảnh</a></p>";
            }
        }
    }
}